package ICG;

import Include.TACLine;

import java.util.ArrayList;
import java.util.List;

// 用于编译器的中间代码生成过程中
// 具体记录了与 for 循环语句相关的索引、循环条件、更新表达式以及相关的参数
public class ForStmt {
    public String CurIndex;
    public TACLine LoopCon;
    public TACLine UpdateCon;
    public List<String> newParas;

    ForStmt(String CurIndex, TACLine LoopCon, TACLine UpdateCon){
        this.CurIndex = CurIndex;
        this.LoopCon = LoopCon;
        this.UpdateCon = UpdateCon;
        this.newParas = new ArrayList<String>();
    }

    ForStmt(String CurIndex){
        this.CurIndex = CurIndex;
        this.LoopCon = null;
        this.UpdateCon = null;
        this.newParas = new ArrayList<String>();
    }

    ForStmt(String CurIndex, TACLine LoopCon){
        this.CurIndex = CurIndex;
        this.LoopCon = LoopCon;
        this.UpdateCon = null;
        this.newParas = new ArrayList<String>();
    }
}
